package cn.itsource.org.domain;

import cn.itsource.basic.domain.BaseTreeNode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_department")
public class Department extends BaseTreeNode<Department> {

    private String sn;
    private String name;
    private Integer state = 1;
    @Column(name = "manager_id")
    private Long managerId;
    @Column(name = "parent_id")
    private Long parentId;
    @Column(name = "dir_path")
    private String dirPath;
    @Transient
    private String userName;
    @Transient
    private String parentName;
    @Transient
    private Long[] parentIds;
}
